class Parent {
    private age: number;
    protected name: string;
    constructor(age: number) {
        this.age = age;
    }
}
const p = new Parent(12);
alert(p);

// { age: 18 }


class Child extends Parent {
    constructor(age: number) {
        super(age);
        console.log(super.age); // undefined
        console.log(super.getAge());
    }
}